package com.zchat.android.views;

import com.zchat.android.R;
import com.zchat.android.tasks.LoadTestTask;
import com.zchat.api.ZChat;

import android.view.View;
import android.widget.ListView;
import android.widget.TextView;


/**
 * 菜单一所对应的view
 * @author Oliverzhu
 * 2012/6/18
 */
public class ViewOneLoader extends AbstractViewLoader{
	private ViewOneLoader() {
	}

	private static ViewOneLoader instance = new ViewOneLoader();

	public static ViewOneLoader getInstance() {
		return instance;
	}

	@Override
	public void loadComponents() {
		v = View.inflate(context, R.layout.menu_view_one, null);
		
		parent.addView(v);
		zchat.getCache().put(key, v);
	}

	@Override
	public void loadDatas(View v) {
		ListView tv = (ListView) v.findViewById(R.id.listView);
		
		Object[] objs = new Object[3];
		objs[0] = context;
		objs[1] = zchat;
		objs[2] = tv;
		
		new LoadTestTask().execute(objs);
	}

}
